package com.fire.activiti.activitidb.example;

import com.fire.activiti.activitidb.process.ProcessEngine;
import com.fire.activiti.activitidb.process.ProcessEngineProvider;
import com.fire.activiti.activitidb.process.RunTimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Mr.Fire
 * @date 2021/12/21
 * @desc
 */
@Service
public class TestService {

    @Autowired
    ProcessEngineProvider processEngineProvider;

    /**
     * 审批
     * @param operateKey
     */
    public void complete(String operateKey){
        ProcessEngine processEngine = processEngineProvider.getProcessEngine();
        RunTimeService runtimeService = processEngine.getRuntimeService();
        runtimeService.complete(operateKey);
    }

}
